package no_git_group;

import org.testng.annotations.*;
import static org.junit.Assert.*;

import no_git_group.model.User;
import no_git_group.model.Film;

public class Movies extends no_git_group.pages.TestBase {
	User admin = new User().setLogin("admin").setPassword("admin");
	Film movieAmelie = new Film().setTitle("Amelie").setYear("2001");
	
	/*@BeforeMethod
	  public void login() {
	    if (app.getUserHelper().isNotLoggedIn()) {
	    	app.getUserHelper().loginAs(admin);
	    }
	  }*/
	  
	  @Test
	  public void addMovie() throws Exception {
		  app.getUserHelper().loginAs(admin);
		  app.getFilmHelper().create(movieAmelie);
	    //assertTrue(app.getUserHelper().isLoggedInAs(user));
	  }
	  
	  /*@Test
	  public void searchMovie() throws Exception {
		  app.getNavigationHelper().openMainPage();
		  app.getFilmHelper().search(movieAmelie.getTitle());
	    //assertTrue(app.getUserHelper().isLoggedInAs(user));
	  }*/

	  @Test
	  public void deleteMovie() throws Exception {
		  //app.getNavigationHelper().openMainPage();
		  app.getFilmHelper().delete(movieAmelie);
	    // assertFalse(app.getUserHelper().isLoggedIn());
	    //assertTrue(app.getUserHelper().isNotLoggedIn());
	  }
	  

}



